package com.woniuxy.Test;

import com.woniuxy.Factory.SingletonFactory;
import com.woniuxy.intface.Person;

/**
 * @Author：向天浩
 * @Date：2022/1/17 20:29
 * @Description :TODO
 */

public class SingletonTest {
    public static void main(String[] args) {
        SingletonFactory singletonFactory = new SingletonFactory();
        Person ch = singletonFactory.getbean("ch");
        Person ch1 = singletonFactory.getbean("ch");
        System.out.println(ch);
        System.out.println(ch1);
        ch.eat();
    }
}
